package com.shangyueshang.controller.finance;

import com.shangyueshang.model.GoodsStorageFee;
import com.shangyueshang.request.PageReq;
import com.shangyueshang.response.HttpResult;
import com.shangyueshang.response.PageResult;
import com.shangyueshang.service.GoodsStorageFeeService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: JokeyZheng
 * @email: zhengjingfeng@ruqimobility.com
 * @created: 2023/5/16 15:14
 * @version: v1.0.0
 */
@RestController
@RequestMapping("/storage")
public class StorageCostController {
	
	@Resource
	private GoodsStorageFeeService goodsStorageFeeService;
	
	/**
	 * 分页查询
	 *
	 * @param pageReq
	 * @return
	 */
	@PostMapping("/findPage")
	@PreAuthorize("hasAuthority('finance:storage:view')")
	public HttpResult<PageResult<GoodsStorageFee>> findPage(@RequestBody PageReq pageReq) {
		return HttpResult.ok(goodsStorageFeeService.findPage(pageReq));
	}
}
